import Vue from 'vue';
import Router from 'vue-router';

const loginPage = resolve => require(['@/page/common/login-page'], resolve)
const userList = resolve => require(['@/page/userManager/userList'], resolve)
const formList = resolve => require(['@/page/formManager/formList'], resolve)
const formDetail = resolve => require(['@/page/formManager/formDetail'], resolve)
const accountList = resolve => require(['@/page/role/accountList'], resolve)
const accountEdit = resolve => require(['@/page/role/accountEdit'], resolve)
const roleList = resolve => require(['@/page/role/roleList'], resolve)
const roleEdit = resolve => require(['@/page/role/roleEdit'], resolve)

Vue.use(Router)

export default new Router({
  mode: 'history',
  base:'/sys/',
  routes: [
      {
          path: '/loginPage',
          name: 'loginPage',
          component: loginPage
      },
      {
          path: '/',
          name: 'userList',
          component: userList
      },
      {
          path: '/formList',
          name: 'formList',
          component: formList
      },
      {
          path: '/formDetail',
          name: 'formDetail',
          component: formDetail
      },
      {
          path: '/accountList',
          name: 'accountList',
          component: accountList
      },
      {
          path: '/accountEdit',
          name: 'accountEdit',
          component: accountEdit
      },
      {
          path: '/roleList',
          name: 'roleList',
          component: roleList
      },
      {
          path: '/roleEdit',
          name: 'roleEdit',
          component: roleEdit
      },
  ]
})
